<?php

namespace app\modules\borrowers\models;

use Yii;

/**
 * This is the model class for table "rah_borrower_project".
 *
 * @property integer $projectID
 * @property integer $borrowerID
 * @property string $customerStatus
 * @property string $accountDate
 * @property integer $isDeleted
 * @property resource $comments
 * @property string $signContractDate
 * @property string $contractNo
 * @property string $createTime
 * @property string $createUser
 * @property string $updateTime
 * @property string $updateUser
 * @property string $owner
 * @property string $borrowerFrom
 * @property string $incomes
 * @property string $borrowAmt
 * @property integer $borrowMonth
 * @property string $customerLevel
 * @property string $customerType
 * @property string $paymentDay
 * @property string $auditAmt
 * @property integer $auditMonth
 * @property string $borrowerSeqNo
 * @property string $transferedUser
 * @property string $transferedDate
 * @property string $contractAmt
 * @property integer $payedMonth
 * @property integer $isDelayed
 * @property string $paymentAmtByMonth
 * @property string $delayedNextPaymentDay
 * @property string $homeAddress
 * @property string $nextMonth
 * @property string $delayedMonth
 * @property string $job
 * @property string $borrowPurpose
 * @property string $signContractAddress
 * @property string $delayedAmt
 * @property string $delayedMonthAmt
 * @property string $fangkuanBankName
 * @property string $fangkuanBankCode
 * @property string $borrowerCustomerType
 * @property string $windAmt
 * @property string $pactAddress
 * @property string $identityAddress
 * @property string $fangkuanTime
 * @property string $aheadPaymentDate
 * @property integer $isBorrowerRedeem
 * @property string $riskStatus
 * @property string $tapeAmt
 * @property string $fengxianjin
 * @property string $jieqingTime
 * @property string $tiqianhuankuanAmt
 * @property string $caiwukoukuanDate
 * @property string $team
 * @property string $souce
 * @property integer $isGuarantee
 * @property integer $isPawn
 * @property double $grade
 * @property integer $groupId
 * @property string $project_start
 * @property string $project_end
 * @property string $project_audit
 * @property integer $receiveBankID
 * @property string $projectNo
 * @property string $payInterestType
 * @property string $channel
 * @property string $projectDesc
 * @property string $projectShengYu
 * @property string $projectZhuanRang
 * @property integer $fromLenderID
 * @property string $fromLenderName
 * @property string $payedInterestAmtByMonth
 */
class BorrowerProject extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'rah_borrower_project';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['borrowerID'], 'required'],
            [['borrowerID', 'isDeleted', 'borrowMonth', 'auditMonth', 'payedMonth', 'isDelayed', 'delayedAmt', 'delayedMonthAmt', 'isBorrowerRedeem', 'isGuarantee', 'isPawn', 'groupId', 'receiveBankID', 'fromLenderID'], 'integer'],
            [['accountDate', 'signContractDate', 'createTime', 'updateTime', 'paymentDay', 'transferedDate', 'delayedNextPaymentDay', 'nextMonth', 'delayedMonth', 'fangkuanTime', 'aheadPaymentDate', 'jieqingTime', 'caiwukoukuanDate', 'project_start', 'project_end', 'project_audit'], 'safe'],
            [['comments'], 'string'],
            [['incomes', 'borrowAmt', 'auditAmt', 'contractAmt', 'paymentAmtByMonth', 'windAmt', 'tapeAmt', 'fengxianjin', 'tiqianhuankuanAmt', 'grade', 'projectShengYu', 'projectZhuanRang', 'payedInterestAmtByMonth'], 'number'],
            [['customerStatus', 'createUser', 'owner', 'customerLevel', 'customerType', 'borrowerSeqNo', 'transferedUser'], 'string', 'max' => 50],
            [['contractNo', 'updateUser', 'team', 'projectNo', 'payInterestType', 'fromLenderName'], 'string', 'max' => 20],
            [['borrowerFrom', 'job', 'borrowPurpose', 'signContractAddress', 'fangkuanBankName', 'fangkuanBankCode', 'borrowerCustomerType'], 'string', 'max' => 45],
            [['homeAddress', 'pactAddress', 'identityAddress'], 'string', 'max' => 100],
            [['riskStatus'], 'string', 'max' => 10],
            [['souce'], 'string', 'max' => 40],
            [['channel'], 'string', 'max' => 30],
            [['projectDesc'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'projectID' => 'Project ID',
            'borrowerID' => 'Borrower ID',
            'customerStatus' => '工作流状态',
            'accountDate' => 'Account Date',
            'isDeleted' => 'Is Deleted',
            'comments' => 'Comments',
            'signContractDate' => '合同签约日期',
            'contractNo' => '合同编号',
            'createTime' => 'Create Time',
            'createUser' => 'Create User',
            'updateTime' => 'Update Time',
            'updateUser' => 'Update User',
            'owner' => '所有者',
            'borrowerFrom' => 'Borrower From',
            'incomes' => 'Incomes',
            'borrowAmt' => '借款金额',
            'borrowMonth' => '借款月数',
            'customerLevel' => '客户经别',
            'customerType' => '客户类型',
            'paymentDay' => '还款日',
            'auditAmt' => '审核金额',
            'auditMonth' => '审核月数',
            'borrowerSeqNo' => '借款序号',
            'transferedUser' => 'Transfered User',
            'transferedDate' => 'Transfered Date',
            'contractAmt' => '合同金额',
            'payedMonth' => '已还款月数',
            'isDelayed' => '是否逾期',
            'paymentAmtByMonth' => '月还款金额',
            'delayedNextPaymentDay' => '逾期后下一还款日',
            'homeAddress' => '家庭住址',
            'nextMonth' => '下一还款日',
            'delayedMonth' => 'Delayed Month',
            'job' => 'Job',
            'borrowPurpose' => 'Borrow Purpose',
            'signContractAddress' => '签约地址',
            'delayedAmt' => '逾期金额',
            'delayedMonthAmt' => '逾期月数',
            'fangkuanBankName' => '放款银行',
            'fangkuanBankCode' => 'Fangkuan Bank Code',
            'borrowerCustomerType' => 'Borrower Customer Type',
            'windAmt' => 'Wind Amt',
            'pactAddress' => 'Pact Address',
            'identityAddress' => 'Identity Address',
            'fangkuanTime' => '放款日期',
            'aheadPaymentDate' => '提前还款日期',
            'isBorrowerRedeem' => '是否已提前还款',
            'riskStatus' => 'Risk Status',
            'tapeAmt' => 'Tape Amt',
            'fengxianjin' => '风险金',
            'jieqingTime' => '结清日期',
            'tiqianhuankuanAmt' => '提前还款金额',
            'caiwukoukuanDate' => 'Caiwukoukuan Date',
            'team' => 'Team',
            'souce' => '来源',
            'isGuarantee' => '是否担保标志',
            'isPawn' => '是否典当',
            'grade' => '评级',
            'groupId' => '所属组织机构',
            'project_start' => '项目开始日期',
            'project_end' => '项目结束日期',
            'project_audit' => '项目审核日期',
            'receiveBankID' => '收款银行 ID',
            'projectNo' => 'Project No',
            'payInterestType' => '付息方式',
            'channel' => 'Channel',
            'projectDesc' => 'Project Desc',
            'projectShengYu' => 'Project Sheng Yu',
            'projectZhuanRang' => 'Project Zhuan Rang',
            'fromLenderID' => '原始出借人ID',
            'fromLenderName' => '原始出借人名称',
            'payedInterestAmtByMonth' => 'Payed Interest Amt By Month',
        ];
    }
}
